<template>
  <van-grid :column-num="5">
    <van-grid-item
      v-for="item in navList"
      :key="item.navid"
      :icon="item.imgurl"
      :text="item.title"
    >
    </van-grid-item>
  </van-grid>
</template>

<script>
import { getGoodsNavList } from "@/api/home";
export default {
  name: "NavList",
  data() {
    return {
      navList: [],
    };
  },
  methods: {
    async getNavList() {
      let res = await getGoodsNavList();
      if (res.data.code === "200") {
        this.navList = res.data.data;
      }
    },
  },
  created() {
    this.getNavList();
  },
};
</script>

<style></style>
